﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using FluentNHibernate.Mapping;
using CMSAR.Domain;

namespace CMSAR.FluentNHibernate.FluentNHibernate
{
  public  class WidgetTypeMapping:ClassMap<WidgetType>
    {

      public WidgetTypeMapping()
      {
          Id(x => x.Id);
          Map(x => x.ControllerName).Not.Nullable();
          Map(x => x.Description);
          Map(x => x.Name).Not.Nullable();
          HasMany(x => x.WidgetInstance).Cascade.All();
      }
    }
}
